package com.lck.blogmanager.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lck.blogmanager.entity.AuditEntity;
import com.lck.blogmanager.mapper.AuditMapper;
import com.lck.blogmanager.req.AuditPageReq;
import com.lck.blogmanager.res.AuditPageRes;
import com.lck.blogmanager.service.AuditService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author wyq
 * @version v1.0.0
 * @explain
 * @date 2024/4/7 17:17
 */
@Service
@Slf4j
@RequiredArgsConstructor
public class AuditServiceImpl extends ServiceImpl<AuditMapper, AuditEntity> implements AuditService {
    @Override
    public Page<AuditPageRes> pageAudit(AuditPageReq req) {
        Page page = new Page(req.getPageNum(), req.getPageSize());
        Page<AuditPageRes> info = this.getBaseMapper().pageAudit(req,page);
        return info;
    }
}
